home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / tcl / tcl70b2.lha / tcl7.0b2 / tcl.h < prev    next >
C/C++ Source or Header  |  1993-07-19  |  21KB  |  594 lines

  1. /*
  2.  * tcl.h --
  3.  *
  4.  *    This header file describes the externally-visible facilities
  5.  *    of the Tcl interpreter.
  6.  *
  7.  * Copyright (c) 1987-1993 The Regents of the University of California.
  8.  * All rights reserved.
  9.  *
  10.  * Permission is hereby granted, without written agreement and without
  11.  * license or royalty fees, to use, copy, modify, and distribute this
  12.  * software and its documentation for any purpose, provided that the
  13.  * above copyright notice and the following two paragraphs appear in
  14.  * all copies of this software.
  15.  * 
  16.  * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
  17.  * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
  18.  * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
  19.  * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  20.  *
  21.  * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
  22.  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
  23.  * AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
  24.  * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
  25.  * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
  26.  *
  27.  * $Header: /user6/ouster/tcl/RCS/tcl.h,v 1.117 93/07/19 08:47:25 ouster Exp $ SPRITE (Berkeley)
  28.  */
  29.  
  30. #ifndef _TCL
  31. #define _TCL
  32.  
  33. #ifndef BUFSIZ
  34. #include <stdio.h>
  35. #endif
  36.  
  37. #define TCL_VERSION "7.0"
  38. #define TCL_MAJOR_VERSION 7
  39. #define TCL_MINOR_VERSION 0
  40.  
  41. /*
  42.  * Definitions that allow this header file to be used either with or
  43.  * without ANSI C features like function prototypes.
  44.  */
  45.  
  46. #undef _ANSI_ARGS_
  47. #undef CONST
  48. #if ((defined(__STDC__) || defined(SABER)) && !defined(NO_PROTOTYPE)) || defined(__cplusplus)
  49. #   define _ANSI_ARGS_(x)    x
  50. #   define CONST const
  51. #   ifdef __cplusplus
  52. #       define VARARGS (...)
  53. #   else
  54. #       define VARARGS ()
  55. #   endif
  56. #else
  57. #   define _ANSI_ARGS_(x)    ()
  58. #   define CONST
  59. #endif
  60.  
  61. #ifdef __cplusplus
  62. #   define EXTERN extern "C"
  63. #else
  64. #   define EXTERN extern
  65. #endif
  66.  
  67. /*
  68.  * Macro to use instead of "void" for arguments that must have
  69.  * type "void *" in ANSI C;  maps them to type "char *" in
  70.  * non-ANSI systems.
  71.  */
  72.  
  73. #ifndef VOID
  74. #   ifdef __STDC__
  75. #       define VOID void
  76. #   else
  77. #       define VOID char
  78. #   endif
  79. #endif
  80.  
  81. /*
  82.  * Miscellaneous declarations (to allow Tcl to be used stand-alone,
  83.  * without the rest of Sprite).
  84.  */
  85.  
  86. #ifndef NULL
  87. #define NULL 0
  88. #endif
  89.  
  90. #ifndef _CLIENTDATA
  91. #   ifdef __STDC__
  92.     typedef void *ClientData;
  93. #   else
  94.     typedef int *ClientData;
  95. #   endif /* __STDC__ */
  96. #define _CLIENTDATA
  97. #endif
  98.  
  99. /*
  100.  * Data structures defined opaquely in this module.  The definitions
  101.  * below just provide dummy types.  A few fields are made visible in
  102.  * Tcl_Interp structures, namely those for returning string values.
  103.  * Note:  any change to the Tcl_Interp definition below must be mirrored
  104.  * in the "real" definition in tclInt.h.
  105.  */
  106.  
  107. typedef struct Tcl_Interp{
  108.     char *result;        /* Points to result string returned by last
  109.                  * command. */
  110.     void (*freeProc) _ANSI_ARGS_((char *blockPtr));
  111.                 /* Zero means result is statically allocated.
  112.                  * If non-zero, gives address of procedure
  113.                  * to invoke to free the result.  Must be
  114.                  * freed by Tcl_Eval before executing next
  115.                  * command. */
  116.     int errorLine;        /* When TCL_ERROR is returned, this gives
  117.                  * the line number within the command where
  118.                  * the error occurred (1 means first line). */
  119. } Tcl_Interp;
  120.  
  121. typedef int *Tcl_Trace;
  122.  
  123. /*
  124.  * When a TCL command returns, the string pointer interp->result points to
  125.  * a string containing return information from the command.  In addition,
  126.  * the command procedure returns an integer value, which is one of the
  127.  * following:
  128.  *
  129.  * TCL_OK        Command completed normally;  interp->result contains
  130.  *            the command's result.
  131.  * TCL_ERROR        The command couldn't be completed successfully;
  132.  *            interp->result describes what went wrong.
  133.  * TCL_RETURN        The command requests that the current procedure
  134.  *            return;  interp->result contains the procedure's
  135.  *            return value.
  136.  * TCL_BREAK        The command requests that the innermost loop
  137.  *            be exited;  interp->result is meaningless.
  138.  * TCL_CONTINUE        Go on to the next iteration of the current loop;
  139.  *            interp->result is meaninless.
  140.  */
  141.  
  142. #define TCL_OK        0
  143. #define TCL_ERROR    1
  144. #define TCL_RETURN    2
  145. #define TCL_BREAK    3
  146. #define TCL_CONTINUE    4
  147.  
  148. #define TCL_RESULT_SIZE 200
  149.  
  150. /*
  151.  * Argument descriptors for math function callbacks in expressions:
  152.  */
  153.  
  154. typedef enum {TCL_INT, TCL_DOUBLE, TCL_EITHER} Tcl_ValueType;
  155. typedef struct Tcl_Value {
  156.     Tcl_ValueType type;        /* Indicates intValue or doubleValue is
  157.                  * valid, or both. */
  158.     int intValue;        /* Integer value. */
  159.     double doubleValue;        /* Double-precision floating value. */
  160. } Tcl_Value;
  161.  
  162. /*
  163.  * Procedure types defined by Tcl:
  164.  */
  165.  
  166. typedef void (Tcl_CmdDeleteProc) _ANSI_ARGS_((ClientData clientData));
  167. typedef int (Tcl_CmdProc) _ANSI_ARGS_((ClientData clientData,
  168.     Tcl_Interp *interp, int argc, char *argv[]));
  169. typedef void (Tcl_CmdTraceProc) _ANSI_ARGS_((ClientData clientData,
  170.     Tcl_Interp *interp, int level, char *command, Tcl_CmdProc *proc,
  171.     ClientData cmdClientData, int argc, char *argv[]));
  172. typedef void (Tcl_FreeProc) _ANSI_ARGS_((char *blockPtr));
  173. typedef void (Tcl_InterpDeleteProc) _ANSI_ARGS_((ClientData clientData,
  174.     Tcl_Interp *interp));
  175. typedef int (Tcl_MathProc) _ANSI_ARGS_((ClientData clientData,
  176.     Tcl_Interp *interp, Tcl_Value *args, Tcl_Value *resultPtr));
  177. typedef char *(Tcl_VarTraceProc) _ANSI_ARGS_((ClientData clientData,
  178.     Tcl_Interp *interp, char *part1, char *part2, int flags));
  179.  
  180. /*
  181.  * The structure returned by Tcl_GetCmdInfo and passed into
  182.  * Tcl_SetCmdInfo:
  183.  */
  184.  
  185. typedef struct Tcl_CmdInfo {
  186.     Tcl_CmdProc *proc;            /* Procedure that implements command. */
  187.     ClientData clientData;        /* ClientData passed to proc. */
  188.     Tcl_CmdDeleteProc *deleteProc;    /* Procedure to call when command
  189.                      * is deleted. */
  190.     ClientData deleteData;        /* Value to pass to deleteProc (usually
  191.                      * the same as clientData). */
  192. } Tcl_CmdInfo;
  193.  
  194. /*
  195.  * The structure defined below is used to hold dynamic strings.  The only
  196.  * field that clients should use is the string field, and they should
  197.  * never modify it.
  198.  */
  199.  
  200. #define TCL_DSTRING_STATIC_SIZE 200
  201. typedef struct Tcl_DString {
  202.     char *string;        /* Points to beginning of string:  either
  203.                  * staticSpace below or a malloc'ed array. */
  204.     int length;            /* Number of non-NULL characters in the
  205.                  * string. */
  206.     int spaceAvl;        /* Total number of bytes available for the
  207.                  * string and its terminating NULL char. */
  208.     char staticSpace[TCL_DSTRING_STATIC_SIZE];
  209.                 /* Space to use in common case where string
  210.                  * is small. */
  211. } Tcl_DString;
  212.  
  213. #define Tcl_DStringLength(dsPtr) ((dsPtr)->length)
  214. #define Tcl_DStringValue(dsPtr) ((dsPtr)->string)
  215.  
  216. /*
  217.  * Definitions for the maximum number of digits of precision that may
  218.  * be specified in the "tcl_precision" variable, and the number of
  219.  * characters of buffer space required by Tcl_PrintDouble.
  220.  */
  221.  
  222. #define TCL_MAX_PREC 17
  223. #define TCL_DOUBLE_SPACE (TCL_MAX_PREC+10)
  224.  
  225. /*
  226.  * Flag values passed to Tcl_Eval (see the man page for details;  also
  227.  * see tclInt.h for additional flags that are only used internally by
  228.  * Tcl):
  229.  */
  230.  
  231. #define TCL_BRACKET_TERM    1
  232.  
  233. /*
  234.  * Flag that may be passed to Tcl_ConvertElement to force it not to
  235.  * output braces (careful!  if you change this flag be sure to change
  236.  * the definitions at the front of tclUtil.c).
  237.  */
  238.  
  239. #define TCL_DONT_USE_BRACES    1
  240.  
  241. /*
  242.  * Flag value passed to Tcl_RecordAndEval to request no evaluation
  243.  * (record only).
  244.  */
  245.  
  246. #define TCL_NO_EVAL        -1
  247.  
  248. /*
  249.  * Special freeProc values that may be passed to Tcl_SetResult (see
  250.  * the man page for details):
  251.  */
  252.  
  253. #define TCL_VOLATILE    ((Tcl_FreeProc *) -1)
  254. #define TCL_STATIC    ((Tcl_FreeProc *) 0)
  255. #define TCL_DYNAMIC    ((Tcl_FreeProc *) free)
  256.  
  257. /*
  258.  * Flag values passed to variable-related procedures.
  259.  */
  260.  
  261. #define TCL_GLOBAL_ONLY        1
  262. #define TCL_APPEND_VALUE    2
  263. #define TCL_LIST_ELEMENT    4
  264. #define TCL_TRACE_READS        0x10
  265. #define TCL_TRACE_WRITES    0x20
  266. #define TCL_TRACE_UNSETS    0x40
  267. #define TCL_TRACE_DESTROYED    0x80
  268. #define TCL_INTERP_DESTROYED    0x100
  269. #define TCL_LEAVE_ERR_MSG    0x200
  270.  
  271. /*
  272.  * Types for linked variables:
  273.  */
  274.  
  275. #define TCL_LINK_INT        1
  276. #define TCL_LINK_DOUBLE        2
  277. #define TCL_LINK_BOOLEAN    3
  278. #define TCL_LINK_STRING        4
  279.  
  280. /*
  281.  * The following declarations either map ckalloc and ckfree to
  282.  * malloc and free, or they map them to procedures with all sorts
  283.  * of debugging hooks defined in tclCkalloc.c.
  284.  */
  285.  
  286. #ifdef TCL_MEM_DEBUG
  287.  
  288. EXTERN char *        Tcl_DbCkalloc _ANSI_ARGS_((unsigned int size,
  289.                 char *file, int line));
  290. EXTERN int        Tcl_DbCkfree _ANSI_ARGS_((char *ptr,
  291.                 char *file, int line));
  292. EXTERN char *        Tcl_DbCkrealloc _ANSI_ARGS_((char *ptr,
  293.                 unsigned int size, char *file, int line));
  294. EXTERN int        Tcl_DumpActiveMemory _ANSI_ARGS_((char *fileName));
  295. EXTERN void        Tcl_ValidateAllMemory _ANSI_ARGS_((char *file,
  296.                 int line));
  297. #  define ckalloc(x) Tcl_DbCkalloc(x, __FILE__, __LINE__)
  298. #  define ckfree(x)  Tcl_DbCkfree(x, __FILE__, __LINE__)
  299. #  define ckrealloc(x,y) Tcl_DbCkrealloc((x), (y),__FILE__, __LINE__)
  300.  
  301. #else
  302.  
  303. #  define ckalloc(x) malloc(x)
  304. #  define ckfree(x)  free(x)
  305. #  define ckrealloc(x,y) realloc(x,y)
  306. #  define Tcl_DumpActiveMemory(x)
  307. #  define Tcl_ValidateAllMemory(x,y)
  308.  
  309. #endif /* TCL_MEM_DEBUG */
  310.  
  311. /*
  312.  * Macro to free up result of interpreter.
  313.  */
  314.  
  315. #define Tcl_FreeResult(interp)                    \
  316.     if ((interp)->freeProc != 0) {                \
  317.     if ((interp)->freeProc == (Tcl_FreeProc *) free) {    \
  318.         ckfree((interp)->result);                \
  319.     } else {                        \
  320.         (*(interp)->freeProc)((interp)->result);        \
  321.     }                            \
  322.     (interp)->freeProc = 0;                    \
  323.     }
  324.  
  325. /*
  326.  * Structure definition for an entry in a hash table.  No-one outside
  327.  * Tcl should access any of these fields directly;  use the macros
  328.  * defined below.
  329.  */
  330.  
  331. typedef struct Tcl_HashEntry {
  332.     struct Tcl_HashEntry *nextPtr;    /* Pointer to next entry in this
  333.                      * hash bucket, or NULL for end of
  334.                      * chain. */
  335.     struct Tcl_HashTable *tablePtr;    /* Pointer to table containing entry. */
  336.     struct Tcl_HashEntry **bucketPtr;    /* Pointer to bucket that points to
  337.                      * first entry in this entry's chain:
  338.                      * used for deleting the entry. */
  339.     ClientData clientData;        /* Application stores something here
  340.                      * with Tcl_SetHashValue. */
  341.     union {                /* Key has one of these forms: */
  342.     char *oneWordValue;        /* One-word value for key. */
  343.     int words[1];            /* Multiple integer words for key.
  344.                      * The actual size will be as large
  345.                      * as necessary for this table's
  346.                      * keys. */
  347.     char string[4];            /* String for key.  The actual size
  348.                      * will be as large as needed to hold
  349.                      * the key. */
  350.     } key;                /* MUST BE LAST FIELD IN RECORD!! */
  351. } Tcl_HashEntry;
  352.  
  353. /*
  354.  * Structure definition for a hash table.  Must be in tcl.h so clients
  355.  * can allocate space for these structures, but clients should never
  356.  * access any fields in this structure.
  357.  */
  358.  
  359. #define TCL_SMALL_HASH_TABLE 4
  360. typedef struct Tcl_HashTable {
  361.     Tcl_HashEntry **buckets;        /* Pointer to bucket array.  Each
  362.                      * element points to first entry in
  363.                      * bucket's hash chain, or NULL. */
  364.     Tcl_HashEntry *staticBuckets[TCL_SMALL_HASH_TABLE];
  365.                     /* Bucket array used for small tables
  366.                      * (to avoid mallocs and frees). */
  367.     int numBuckets;            /* Total number of buckets allocated
  368.                      * at **bucketPtr. */
  369.     int numEntries;            /* Total number of entries present
  370.                      * in table. */
  371.     int rebuildSize;            /* Enlarge table when numEntries gets
  372.                      * to be this large. */
  373.     int downShift;            /* Shift count used in hashing
  374.                      * function.  Designed to use high-
  375.                      * order bits of randomized keys. */
  376.     int mask;                /* Mask value used in hashing
  377.                      * function. */
  378.     int keyType;            /* Type of keys used in this table. 
  379.                      * It's either TCL_STRING_KEYS,
  380.                      * TCL_ONE_WORD_KEYS, or an integer
  381.                      * giving the number of ints in a
  382.                      */
  383.     Tcl_HashEntry *(*findProc) _ANSI_ARGS_((struct Tcl_HashTable *tablePtr,
  384.         char *key));
  385.     Tcl_HashEntry *(*createProc) _ANSI_ARGS_((struct Tcl_HashTable *tablePtr,
  386.         char *key, int *newPtr));
  387. } Tcl_HashTable;
  388.  
  389. /*
  390.  * Structure definition for information used to keep track of searches
  391.  * through hash tables:
  392.  */
  393.  
  394. typedef struct Tcl_HashSearch {
  395.     Tcl_HashTable *tablePtr;        /* Table being searched. */
  396.     int nextIndex;            /* Index of next bucket to be
  397.                      * enumerated after present one. */
  398.     Tcl_HashEntry *nextEntryPtr;    /* Next entry to be enumerated in the
  399.                      * the current bucket. */
  400. } Tcl_HashSearch;
  401.  
  402. /*
  403.  * Acceptable key types for hash tables:
  404.  */
  405.  
  406. #define TCL_STRING_KEYS        0
  407. #define TCL_ONE_WORD_KEYS    1
  408.  
  409. /*
  410.  * Macros for clients to use to access fields of hash entries:
  411.  */
  412.  
  413. #define Tcl_GetHashValue(h) ((h)->clientData)
  414. #define Tcl_SetHashValue(h, value) ((h)->clientData = (ClientData) (value))
  415. #define Tcl_GetHashKey(tablePtr, h) \
  416.     ((char *) (((tablePtr)->keyType == TCL_ONE_WORD_KEYS) ? (h)->key.oneWordValue \
  417.                         : (h)->key.string))
  418.  
  419. /*
  420.  * Macros to use for clients to use to invoke find and create procedures
  421.  * for hash tables:
  422.  */
  423.  
  424. #define Tcl_FindHashEntry(tablePtr, key) \
  425.     (*((tablePtr)->findProc))(tablePtr, key)
  426. #define Tcl_CreateHashEntry(tablePtr, key, newPtr) \
  427.     (*((tablePtr)->createProc))(tablePtr, key, newPtr)
  428.  
  429. /*
  430.  * Exported Tcl procedures:
  431.  */
  432.  
  433. EXTERN void        Tcl_AppendElement _ANSI_ARGS_((Tcl_Interp *interp,
  434.                 char *string));
  435. EXTERN void        Tcl_AppendResult _ANSI_ARGS_(VARARGS);
  436. EXTERN int        Tcl_AppInit _ANSI_ARGS_((Tcl_Interp *interp));
  437. EXTERN void        Tcl_AddErrorInfo _ANSI_ARGS_((Tcl_Interp *interp,
  438.                 char *message));
  439. EXTERN char        Tcl_Backslash _ANSI_ARGS_((char *src,
  440.                 int *readPtr));
  441. EXTERN void        Tcl_CallWhenDeleted _ANSI_ARGS_((Tcl_Interp *interp,
  442.                 Tcl_InterpDeleteProc *proc,
  443.                 ClientData clientData));
  444. EXTERN int        Tcl_CommandComplete _ANSI_ARGS_((char *cmd));
  445. EXTERN char *        Tcl_Concat _ANSI_ARGS_((int argc, char **argv));
  446. EXTERN int        Tcl_ConvertElement _ANSI_ARGS_((char *src,
  447.                 char *dst, int flags));
  448. EXTERN void        Tcl_CreateCommand _ANSI_ARGS_((Tcl_Interp *interp,
  449.                 char *cmdName, Tcl_CmdProc *proc,
  450.                 ClientData clientData,
  451.                 Tcl_CmdDeleteProc *deleteProc));
  452. EXTERN Tcl_Interp *    Tcl_CreateInterp _ANSI_ARGS_((void));
  453. EXTERN void        Tcl_CreateMathFunc _ANSI_ARGS_((Tcl_Interp *interp,
  454.                 char *name, int numArgs, Tcl_ValueType *argTypes,
  455.                 Tcl_MathProc *proc, ClientData clientData));
  456. EXTERN int        Tcl_CreatePipeline _ANSI_ARGS_((Tcl_Interp *interp,
  457.                 int argc, char **argv, int **pidArrayPtr,
  458.                 int *inPipePtr, int *outPipePtr,
  459.                 int *errFilePtr));
  460. EXTERN Tcl_Trace    Tcl_CreateTrace _ANSI_ARGS_((Tcl_Interp *interp,
  461.                 int level, Tcl_CmdTraceProc *proc,
  462.                 ClientData clientData));
  463. EXTERN void        Tcl_DeleteHashEntry _ANSI_ARGS_((
  464.                 Tcl_HashEntry *entryPtr));
  465. EXTERN void        Tcl_DeleteHashTable _ANSI_ARGS_((
  466.                 Tcl_HashTable *tablePtr));
  467. EXTERN char *        Tcl_DStringAppend _ANSI_ARGS_((Tcl_DString *dsPtr,
  468.                 char *string, int length));
  469. EXTERN char *        Tcl_DStringAppendElement _ANSI_ARGS_((
  470.                 Tcl_DString *dsPtr, char *string));
  471. EXTERN void        Tcl_DStringFree _ANSI_ARGS_((Tcl_DString *dsPtr));
  472. EXTERN void        Tcl_DStringInit _ANSI_ARGS_((Tcl_DString *dsPtr));
  473. EXTERN void        Tcl_DStringResult _ANSI_ARGS_((Tcl_Interp *interp,
  474.                 Tcl_DString *dsPtr));
  475. EXTERN void        Tcl_DStringTrunc _ANSI_ARGS_((Tcl_DString *dsPtr,
  476.                 int length));
  477. EXTERN int        Tcl_DeleteCommand _ANSI_ARGS_((Tcl_Interp *interp,
  478.                 char *cmdName));
  479. EXTERN void        Tcl_DeleteInterp _ANSI_ARGS_((Tcl_Interp *interp));
  480. EXTERN void        Tcl_DeleteTrace _ANSI_ARGS_((Tcl_Interp *interp,
  481.                 Tcl_Trace trace));
  482. EXTERN void        Tcl_DetachPids _ANSI_ARGS_((int numPids, int *pidPtr));
  483. EXTERN void        Tcl_EnterFile _ANSI_ARGS_((Tcl_Interp *interp,
  484.                 FILE *file, int readable, int writable));
  485. EXTERN char *        Tcl_ErrnoId _ANSI_ARGS_((void));
  486. EXTERN int        Tcl_Eval _ANSI_ARGS_((Tcl_Interp *interp, char *cmd));
  487. EXTERN int        Tcl_EvalFile _ANSI_ARGS_((Tcl_Interp *interp,
  488.                 char *fileName));
  489. EXTERN int        Tcl_ExprBoolean _ANSI_ARGS_((Tcl_Interp *interp,
  490.                 char *string, int *ptr));
  491. EXTERN int        Tcl_ExprDouble _ANSI_ARGS_((Tcl_Interp *interp,
  492.                 char *string, double *ptr));
  493. EXTERN int        Tcl_ExprLong _ANSI_ARGS_((Tcl_Interp *interp,
  494.                 char *string, long *ptr));
  495. EXTERN int        Tcl_ExprString _ANSI_ARGS_((Tcl_Interp *interp,
  496.                 char *string));
  497. EXTERN Tcl_HashEntry *    Tcl_FirstHashEntry _ANSI_ARGS_((
  498.                 Tcl_HashTable *tablePtr,
  499.                 Tcl_HashSearch *searchPtr));
  500. EXTERN int        Tcl_GetBoolean _ANSI_ARGS_((Tcl_Interp *interp,
  501.                 char *string, int *boolPtr));
  502. EXTERN int        Tcl_GetCommandInfo _ANSI_ARGS_((Tcl_Interp *interp,
  503.                 char *cmdName, Tcl_CmdInfo *infoPtr));
  504. EXTERN int        Tcl_GetDouble _ANSI_ARGS_((Tcl_Interp *interp,
  505.                 char *string, double *doublePtr));
  506. EXTERN int        Tcl_GetInt _ANSI_ARGS_((Tcl_Interp *interp,
  507.                 char *string, int *intPtr));
  508. EXTERN int        Tcl_GetOpenFile _ANSI_ARGS_((Tcl_Interp *interp,
  509.                 char *string, int write, int checkUsage,
  510.                 FILE **filePtr));
  511. EXTERN char *        Tcl_GetVar _ANSI_ARGS_((Tcl_Interp *interp,
  512.                 char *varName, int flags));
  513. EXTERN char *        Tcl_GetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
  514.                 char *part1, char *part2, int flags));
  515. EXTERN int        Tcl_GlobalEval _ANSI_ARGS_((Tcl_Interp *interp,
  516.                 char *command));
  517. EXTERN char *        Tcl_HashStats _ANSI_ARGS_((Tcl_HashTable *tablePtr));
  518. EXTERN void        Tcl_InitHashTable _ANSI_ARGS_((Tcl_HashTable *tablePtr,
  519.                 int keyType));
  520. EXTERN void        Tcl_InitMemory _ANSI_ARGS_((Tcl_Interp *interp));
  521. EXTERN void        Tcl_LinkedVarWritable _ANSI_ARGS_((Tcl_Interp *interp,
  522.                 char *varName, int writable));
  523. EXTERN int        Tcl_LinkVar _ANSI_ARGS_((Tcl_Interp *interp,
  524.                 char *varName, char *addr, int type));
  525. EXTERN char *        Tcl_Merge _ANSI_ARGS_((int argc, char **argv));
  526. EXTERN Tcl_HashEntry *    Tcl_NextHashEntry _ANSI_ARGS_((
  527.                 Tcl_HashSearch *searchPtr));
  528. EXTERN char *        Tcl_ParseVar _ANSI_ARGS_((Tcl_Interp *interp,
  529.                 char *string, char **termPtr));
  530. EXTERN char *        Tcl_PosixError _ANSI_ARGS_((Tcl_Interp *interp));
  531. EXTERN void        Tcl_PrintDouble _ANSI_ARGS_((Tcl_Interp *interp,
  532.                 double value, char *dst));
  533. EXTERN void        Tcl_ReapDetachedProcs _ANSI_ARGS_((void));
  534. EXTERN int        Tcl_RecordAndEval _ANSI_ARGS_((Tcl_Interp *interp,
  535.                 char *cmd, int flags));
  536. EXTERN int        Tcl_RegExpMatch _ANSI_ARGS_((Tcl_Interp *interp,
  537.                 char *string, char *pattern));
  538. EXTERN void        Tcl_ResetResult _ANSI_ARGS_((Tcl_Interp *interp));
  539. #define Tcl_Return Tcl_SetResult
  540. EXTERN int        Tcl_ScanElement _ANSI_ARGS_((char *string,
  541.                 int *flagPtr));
  542. EXTERN int        Tcl_SetCommandInfo _ANSI_ARGS_((Tcl_Interp *interp,
  543.                 char *cmdName, Tcl_CmdInfo *infoPtr));
  544. EXTERN void        Tcl_SetErrorCode _ANSI_ARGS_(VARARGS);
  545. EXTERN int        Tcl_SetRecursionLimit _ANSI_ARGS_((Tcl_Interp *interp,
  546.                 int depth));
  547. EXTERN void        Tcl_SetResult _ANSI_ARGS_((Tcl_Interp *interp,
  548.                 char *string, Tcl_FreeProc *freeProc));
  549. EXTERN char *        Tcl_SetVar _ANSI_ARGS_((Tcl_Interp *interp,
  550.                 char *varName, char *newValue, int flags));
  551. EXTERN char *        Tcl_SetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
  552.                 char *part1, char *part2, char *newValue,
  553.                 int flags));
  554. EXTERN char *        Tcl_SignalId _ANSI_ARGS_((int sig));
  555. EXTERN char *        Tcl_SignalMsg _ANSI_ARGS_((int sig));
  556. EXTERN int        Tcl_SplitList _ANSI_ARGS_((Tcl_Interp *interp,
  557.                 char *list, int *argcPtr, char ***argvPtr));
  558. EXTERN int        Tcl_StringMatch _ANSI_ARGS_((char *string,
  559.                 char *pattern));
  560. EXTERN char *        Tcl_TildeSubst _ANSI_ARGS_((Tcl_Interp *interp,
  561.                 char *name, Tcl_DString *bufferPtr));
  562. EXTERN int        Tcl_TraceVar _ANSI_ARGS_((Tcl_Interp *interp,
  563.                 char *varName, int flags, Tcl_VarTraceProc *proc,
  564.                 ClientData clientData));
  565. EXTERN int        Tcl_TraceVar2 _ANSI_ARGS_((Tcl_Interp *interp,
  566.                 char *part1, char *part2, int flags,
  567.                 Tcl_VarTraceProc *proc, ClientData clientData));
  568. EXTERN void        Tcl_UnlinkVar _ANSI_ARGS_((Tcl_Interp *interp,
  569.                 char *varName));
  570. EXTERN int        Tcl_UnsetVar _ANSI_ARGS_((Tcl_Interp *interp,
  571.                 char *varName, int flags));
  572. EXTERN int        Tcl_UnsetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
  573.                 char *part1, char *part2, int flags));
  574. EXTERN void        Tcl_UntraceVar _ANSI_ARGS_((Tcl_Interp *interp,
  575.                 char *varName, int flags, Tcl_VarTraceProc *proc,
  576.                 ClientData clientData));
  577. EXTERN void        Tcl_UntraceVar2 _ANSI_ARGS_((Tcl_Interp *interp,
  578.                 char *part1, char *part2, int flags,
  579.                 Tcl_VarTraceProc *proc, ClientData clientData));
  580. EXTERN int        Tcl_VarEval _ANSI_ARGS_(VARARGS);
  581. EXTERN ClientData    Tcl_VarTraceInfo _ANSI_ARGS_((Tcl_Interp *interp,
  582.                 char *varName, int flags,
  583.                 Tcl_VarTraceProc *procPtr,
  584.                 ClientData prevClientData));
  585. EXTERN ClientData    Tcl_VarTraceInfo2 _ANSI_ARGS_((Tcl_Interp *interp,
  586.                 char *part1, char *part2, int flags,
  587.                 Tcl_VarTraceProc *procPtr,
  588.                 ClientData prevClientData));
  589. EXTERN void        Tcl_CallWhenDeleted _ANSI_ARGS_((Tcl_Interp *interp,
  590.                 Tcl_InterpDeleteProc *proc,
  591.                 ClientData clientData));
  592.  
  593. #endif /* _TCL */
  594.